package kr.hkit.androidcomplete01;

import kr.hkit.androidcomplete01.R;
import kr.hkit.androidcomplete01.chapter06.Ch06MainActivity;
import kr.hkit.androidcomplete01.chapter07.Ch07MainActivity;
import kr.hkit.androidcomplete01.chapter08.Ch08_MainActivity;
import kr.hkit.androidcomplete01.chapter09.Ch09_MainActivity;
import kr.hkit.androidcomplete01.chapter11.Ch11_MainActivity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}
	
	public void mOnClick(View v){
		Intent intent = new Intent();
		
		switch(v.getId()){
		
		case R.id.ch06_btn:
			intent = new Intent(this, Ch06MainActivity.class);
			break;
			
		case R.id.ch07_btn:
			intent = new Intent(this, Ch07MainActivity.class);
			break;
			
		case R.id.ch08_btn:
			intent = new Intent(this, Ch08_MainActivity.class);
			break;
			
		case R.id.ch09_btn:
			intent = new Intent(this, Ch09_MainActivity.class);
			break;
			
		case R.id.ch11_btn:
			intent = new Intent(this, Ch11_MainActivity.class);
			break;
		}
		
		startActivity(intent);
	}

}
